<?php


require 'common.php';
if($_POST){
    $title = $_POST['title'];
    $content = $_POST['content'];
    $class = $_POST['categoryId'];
    $time = time();
    $r = mysql_query("insert into `blogclass`(`title`,`content`,`class`,`time`)value('$title','$content','$class','$time')");
//    print_r($r);
    echo '<script>alert("发布成功！");location.href="index.php"</script>';
}
require 'templates/add.html';